#include"namePipe.hpp"
using namespace bit;

//服务端读消息：
int main()
{
    NamedPipe_Read pipe;
    while(true)
    {
        #ifdef v1
        std::string mes;
        int n = pipe.Read(mes);
        if(n > 0)
        {
            std::cout << mes << std::endl;
        }
        else break;
        #endif
        #ifdef v2
        std::string mes;
        int n = pipe.Read(mes);
        if(n > 0)
        {
            std::cout << "Client Say->";
            std::cout << mes << std::endl;
        }
        else break;
        #endif
    }
    return 0;
}